package com.headmaster.wap.util;

import java.util.HashMap;
import java.util.Map;

import org.apache.commons.lang.StringUtils;
import org.codehaus.jackson.map.ObjectMapper;

public class JsonUtil {
	public static Map<String,Object> jsonToMap(String json) throws Exception{
		if(StringUtils.isBlank(json)){
			return new HashMap<String, Object>();
		}
		ObjectMapper mapper = new ObjectMapper();
		Map<String,Object> jsonMap = mapper.readValue(json, Map.class);
		return jsonMap;
	}
}
